<?php

if (!defined('BLOCK_FILE')) {
header("Location: ../index.php");
exit;
}

<?php 
if (!defined('BLOCK_FILE')) { 
Header("Location: ../index.php"); 
exit; 
} 

global $tracker_lang, $ss_uri, $options; 
$blocktitle = $tracker_lang['statistic']; 

$male = $female = $disabled = $registered = $warned_users = 0; 
$res = sql_query('SELECT gender, numwarning, enabled FROM users'); 

while($row = @mysql_fetch_assoc($res)) 
{ 
    if($row['gender'] == '1') 
        $male++; 
     
    if($row['gender'] == '2') 
        $female++; 

    if($row['gender'] == '2' OR $row['gender'] == '1') 
        $registered++; 

    if($row['numwarning'] > '0' && $row['enabled'] == 'yes') 
        $warned_users++; 

    if($row['enabled'] == 'no') 
        $disabled++; 
} 


$seeders = $leechers = 0; 
$res2 = sql_query('SELECT seeder FROM peers'); 

while($row2 = @mysql_fetch_assoc($res2)) 
{ 
    if($row2['seeder'] == 'yes') 
        $seeders++; 
     
    if($row2['seeder'] == 'no') 
        $leechers++; 
} 

$peers = number_format($seeders + $leechers); 


$torrents = $dead = 0; 
$res3 = sql_query('SELECT visible FROM torrents'); 

while($row3 = @mysql_fetch_assoc($res3)) 
{ 
    if($row3['visible'] == 'no') 
        $dead++; 
     
    if($row3['visible'] == 'no' OR $row3['visible'] == 'yes') 
        $torrents++; 
} 

$content .= "<table width=\"100%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\"><td align=\"center\"> 
<table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\"> 

<table width=\"100%\" class=\"main\" border=\"0\" cellspacing=\"0\" cellpadding=\"10\"> 
<tr> 
<td width=\"50%\" align=\"center\" style=\"border: none;\"><table class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\"> 
<tr><td class=\"rowhead\">".$tracker_lang['users_registered']."</td><td align=right><img src=\"pic/male.gif\" alt=\"".$tracker_lang['mens']."\">".number_format($male + 50)."<img src=\"pic/female.gif\" alt=\"".$tracker_lang['girls']."\">".number_format($female + 50)."<br />".$tracker_lang['total'].": ".number_format($registered + 100)."</td></tr> 
<tr><td colspan=\"2\" class=\"rowhead\"><table width=\"100%\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\"><tr><td style=\"text-align: right; font-weight: bold; vertical-align: top;\">".$tracker_lang['user_limit']."</td><td align=\"right\">$options[maxusers]</td></tr></table></td></tr> 
<tr><td class=\"rowhead\">".$tracker_lang['users_warned']."&nbsp;<img src=\"pic/warned.gif\" border=0 align=absbottom></td><td align=right>$warned_users</td></tr> 
<tr><td class=\"rowhead\">".$tracker_lang['users_disabled']."&nbsp;<img src=\"pic/disabled.gif\" border=0 align=absbottom></td><td align=right>$disabled</td></tr> 

</table></td> 
<td width=\"50%\" align=\"center\" style=\"border: none;\"><table class=main border=1 cellspacing=0 cellpadding=5> 
<tr><td class=\"rowhead\">".$tracker_lang['tracker_torrents']."</td><td align=right>$torrents</td></tr> 
<tr><td class=\"rowhead\">".$tracker_lang['tracker_dead_torrents']."</td><td align=right>$dead</td></tr> 
<tr><td class=\"rowhead\">".$tracker_lang['tracker_peers']."</td><td align=right>$peers</td></tr>"; 
if (isset($peers)) { 
$content .= "<tr><td class=\"rowhead\">".$tracker_lang['tracker_seeders']."&nbsp;&nbsp;<img src=\"./themes/$ss_uri/images/arrowup.gif\" border=0 align=absbottom></td><td align=right>$seeders</td></tr> 
<tr><td class=\"rowhead\">".$tracker_lang['tracker_leechers']."&nbsp;&nbsp;<img src=\"./themes/$ss_uri/images/arrowdown.gif\" border=0 align=absbottom></td><td align=right>$leechers</td></tr>"; 
} 

$content .= "</table></td> 

</table> 
</td></tr></table>"; 

?>
?>